#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Libs配置测试
测试新的static_libs和shared_libs配置方式
"""

Import('env')
env = env.Clone()

# 创建基础静态库
env.AddStaticLibrary(
    name='base_static',
    sources=['src/base_static.cpp'],
    include_paths=['include'],
    export_include_paths=['include']
)

# 创建基础动态库
env.AddSharedLibrary(
    name='base_shared',
    sources=['src/base_shared.cpp'],
    include_paths=['include'],
    export_include_paths=['include']
)

# 创建混合依赖的静态库（依赖另一个静态库）
env.AddStaticLibrary(
    name='mixed_static',
    sources=['src/mixed_static.cpp'],
    include_paths=['include'],
    export_include_paths=['include'],
    static_libs=['base_static']  # 依赖静态库
)

# 创建测试可执行文件 - 只依赖静态库
env.AddExecutable(
    name='test_static_only',
    sources=['src/test_static.cpp'],
    include_paths=['include'],
    static_libs=['mixed_static']  # 依赖静态库
)

# 创建测试可执行文件 - 只依赖动态库
env.AddExecutable(
    name='test_shared_only',
    sources=['src/test_shared.cpp'],
    include_paths=['include'],
    shared_libs=['base_shared']  # 依赖动态库
)

# 创建测试可执行文件 - 混合依赖
env.AddExecutable(
    name='test_mixed_libs',
    sources=['src/test_mixed.cpp'],
    include_paths=['include'],
    static_libs=['base_static'],   # 依赖静态库
    shared_libs=['base_shared']    # 依赖动态库
)